home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
PROGRAM
/
NRPAS13.ARJ
/
ZBRAC.DEM
< prev
next >
Wrap
Text File
|
1991-04-29
|
619b
|
32 lines
PROGRAM d9r2(input,output);
(* driver for routine ZBRAC *)
VAR
succes : boolean;
i : integer;
x1,x2 : real;
(*$I MODFILE.PAS *)
(*$I BESSJ0.PAS *)
FUNCTION fx(x: real): real;
BEGIN
fx := bessj0(x)
END;
(*$I ZBRAC.PAS *)
BEGIN
writeln('bracketing values:':21,'function values:':23);
writeln('x1':6,'x2':10,
'bessj0(x1)':21,'bessj0(x2)':12);
FOR i := 1 to 10 DO BEGIN
x1 := i;
x2 := x1+1.0;
zbrac(x1,x2,succes);
IF (succes) THEN BEGIN
writeln(x1:7:2,x2:10:2,' ':7,
fx(x1):12:6,fx(x2):12:6)
END
END
END.